﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WfTimedExecService
{
    public class Time_Stamp
    {
        #region 生成时间戳
        /// <summary>
        /// 生成时间戳
        /// </summary>
        /// <returns></returns>
        public static int Timestamp()
        {
            DateTime time = DateTime.Now;
            int intResult = 0;
            System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1));
            intResult = (int)(time - startTime).TotalSeconds;
            return intResult;
        }
        #endregion
    }
}
